package com.ailink.design.pattern.strategy;

/**
 * Created by Administrator on 2018/9/21
 */
public class Test {
    public static void main(String[] args) {
        Duck duck1 = new MallardDuck();
        duck1.display();
        duck1.quack();
        duck1.fly();

        Duck duck2 = new RedheadDuck();
        duck2.display();
        duck2.quack();
        duck2.fly();

        Duck duck3 = new RubberDuck();
        duck3.display();
        duck3.quack();
        duck3.fly();

        Duck duck4 = new BigYellowDuck();
        duck4.display();
        duck4.quack();
        duck4.fly();
    }
}
